package cn.ffcs.bpm.web;

import cn.ffcs.base.web.BaseAction;
import cn.ffcs.bpm.model.ProcTranRecord;

/**
 * 
 * 流程action层，实现页面业务逻辑<br/> <table>
 * <tr>
 * <td>负责人/principal: </td>
 * <td colspan="2">pany</td>
 * <tr>
 * <td>修改记录/revision:</td>
 * <td colspan="2"></td>
 * </tr>
 * <tr>
 * <td>日期:</td>
 * <td>修改人:</td>
 * <td>修改说明:</td>
 * </tr>
 * <tr>
 * <td></td>
 * <td></td>
 * <td></td>
 * </tr>
 * </table>
 * @author pany
 * @version $Id$
 */
public class ProcTranRecordAction<P extends ProcTranRecord> extends
        BaseAction<P>
{
    private static final int BUFFER_SIZE = 512 * 1024;
    /** 业务POJO **/
    private P procTranRecord;
    

    /**
     * 新增或修改产品产品字典数据
     * @return
     */
    public String saveOrUpdate()
    {
        baseService.saveOrUpdate(procTranRecord);
        //lProductDictType=dictTypeService.findAll();  
        returnMsg="保存操作已成功！";
        return SUCCESS;
    }
    
    /**
     * 
     * 根据关键字获取实体数据
     * @return
     */
    public String findById()
    {
        if (procTranRecord != null && procTranRecord.getId() != 0)
        {
            procTranRecord = (P) baseService.findById(procTranRecord.getId());
        }
        return SUCCESS;
    }
    
    /**
     * 
     * 删除操作
     * @return
     */
    public String remove()
    {
        baseService.remove(procTranRecord);
        return SUCCESS;
    }

    
    
    
    
}
